import { core } from "../core";

/** 
 * 抽象管理器
 * @description 所有管理器类的父类，管理和实现游戏逻辑
*/
export default abstract class Manager implements IManager {
    public static readonly instance: Manager;
    protected _launched: boolean;
    public get launched(): boolean { return this._launched; }
    protected constructor() {
        this.onLaunched();
        this._launched = true;
    }

    protected onLaunched(): void {
        // if (DEBUG) console.debug(`[${nameOfClazz(this)}] launched ...`);
    }

    protected on(type: NotifyType, handler: NotifyHandler, priority: number = 0): void {
        // core.on(type, handler, this, priority);
    }
    protected off(type: NotifyType, handler: NotifyHandler, priority: number = 0): void {
        // core.on(type, handler, this, priority);
    }

    protected notify(type: NotifyType, ...data: any[]): void {
        // core.notify(type, ...data);
    }

    public clear():void {
    }
}